package cn.tangsihai.hrm.web.controller;

import cn.tangsihai.hrm.dto.CourseDto;
import cn.tangsihai.hrm.service.IESService;
import cn.tangsihai.hrm.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/es")
public class ESController {
    @Autowired
    private IESService esService;

    /**
     * 商品展示
     * @return
     */
    @PostMapping("/searchCourse")
    public AjaxResult searchCourse(@RequestBody CourseDto dto){
        return AjaxResult.me().setResultObj(esService.searchCourse(dto));
    }
}
